<html>
<body>
Reports methods whose return values are never used when called.
The return type of such methods can be made <code>void</code>.
<p>Methods annotated with Error Prone's or AssertJ's <code>@CanIgnoreReturnValue</code> annotation will not be reported.
  The quick-fix updates the method signature and removes <code>return</code> statements from inside the method.</p>
<p><b>Example:</b></p>
<pre><code>
  // reported if visibility setting is Protected or Public
  protected String myToUpperCase(String s) {
    return s.toUpperCase();
  }

  // simple setter, reporting depends on setting
  public String setStr(String str) {
    myStr = str;
    return myStr;
  }

  void test() {
    setStr("value");          // return value is unused
    myToUpperCase("result");  // return value is unused
  }
</code></pre>
<p>After the quick-fix is applied to both methods:</p>
<pre><code>
    protected void myToUpperCase(String s) {
      // 'return' removed completely
      // as 's.toUpperCase()' has no side effect
    }

    public void setStr(String str) {
      myStr = str;
      // 'return' removed
    }
  ...
</code></pre>
<p>
  <b>NOTE:</b> Some methods might not be reported during in-editor highlighting due to performance reasons.
  To see all results, run the inspection using <b>Code | Inspect Code</b> or <b>Code | Analyze Code | Run Inspection by Name</b>>
</p>
<!-- tooltip end -->
<p>Use the <b>Ignore chainable methods</b> option to ignore unused return values from chainable calls.</p>
<p>Use the <b>Maximal reported method visibility</b> option to control the maximum visibility of methods to be reported.</p>
</body>
</html>
